﻿;PS2机战系列,按t键读取战斗存档.按p中止或开启热键,对应模拟器1.40版本,类名不同

SetTitleMatchMode,RegEx

hotKeySuspend:=0	;是否中断热键,0表示开启1表示中断

gui,add,text,,Script for PS2_1.40 SuperRoberWar`nPress t to load continue save`nPress g to reset`nPress l to skip`nVersion=1.0.x4593
gui,add,text,vStatus w120,Status:hotKey On	;显示状态On是开启热键Off是中止热键
gui,add,button,,Exit
gui,add,button,,Toggle	;开启或中断热键
gui,show,w250h170

;定义键位
L1=z
R1=x
L2=c
R2=v
START=space
SELECT=e

return

ButtonToggle:
if(hotKeySuspend=0)
{
	hotKeySuspend:=1
	GuiControl,text,Status,Status:hotKey Off
}
else
{
	hotKeySuspend:=0
	GuiControl,text,Status,Status:hotKey On
}
return

ButtonExit:
MsgBox,4,,Exit this Script?
IfMsgBox Yes
{
	ExitApp
}
return

GuiClose:
ExitApp
return

;Start hotkeys
#IfWinActive,ahk_class wxWindowNR*

~t::
if(hotKeySuspend>0)
{
	return
}

send {%L1% DOWN}
send {%R1% down}
send {%L2% DOWN}
send {%R2% down}
send {%START% down}
sleep,500
send {%SELECT% down}
sleep,500
send {%L1% up}
send {%R1% up}
send {%L2% up}
send {%R2% up}
send {%START% up}
sleep,5000
send {%SELECT% up}
return

~g::
if(hotKeySuspend>0)
{
	return
}

send {%L1% DOWN}
send {%R1% down}
send {%L2% DOWN}
send {%R2% down}
send {%SELECT% down}
send {%START% down}
sleep,1000
send {%L1% up}
send {%R1% up}
send {%L2% up}
send {%R2% up}
send {%START% up}
send {%SELECT% up}
return

~l::
if(hotKeySuspend>0)
{
	return
}

send {%R1% DOWN}
sleep,500
send {%START% down}
sleep,500
send {%R1% up}
sleep,500
send {%START% up}
return

#IfWinActive